<?php $this->_extends('_layouts/default_layout'); ?>
<?php $this->_block('contents'); ?>

<h1> <?php echo $vote->vote_name ?></h1></br>
<h2> <?php echo $vote->vote_summary; ?> </h2></br>
<h3> <?php echo $vote->vote_content; ?> </h3></br>

<ul>
<?php foreach($options as $option): ?>
<?php 
$percentage = sprintf("%01.2f", $option->option_count/$total_count * 100);
echo "<li>$option->option_content : $option->option_count 票, 得票率：%$percentage</li>" ; 
?></br>
<?php endforeach; ?>
</ul>

<a href="<?php echo url('vote/index'); ?> ">回到主页</a>


<?php $this->_endblock(); ?>
